{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Processing Bird Call Data\n",
    "\n",
    "## Background\n",
    "\n",
    "The following example was obtained by translating the R code from [TidyTuesday 2019-04-30](https://github.com/rfordatascience/tidytuesday/tree/47567cb80846739c8543d158c1f3ff226c7e5a5f/data/2019/2019-04-30)\n",
    "to Python using Pandas and PyJanitor. It provides a simple example of using pyjanitor for:\n",
    "- column renaming\n",
    "- column name cleaning\n",
    "- dataframe merging\n",
    "\n",
    "The data originates from a study of the effects of articifial light on bird behaviour. It is a subset of the original study for the Chicago area."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Citations\n",
    "\n",
    "This data set originates from the publication:\n",
    "\n",
    ">*Winger BM, Weeks BC, Farnsworth A, Jones AW, Hennen M, Willard DE (2019) Nocturnal flight-calling behaviour predicts vulnerability to artificial light in migratory birds. Proceedings of the Royal Society B 286(1900): 20190364.* https://doi.org/10.1098/rspb.2019.0364\n",
    "\n",
    "To reference only the data, please cite the Dryad data package:\n",
    "\n",
    "> *Winger BM, Weeks BC, Farnsworth A, Jones AW, Hennen M, Willard DE (2019) Data from: Nocturnal flight-calling behaviour predicts vulnerability to artificial light in migratory birds. Dryad Digital Repository.* https://doi.org/10.5061/dryad.8rr0498"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Get Raw Data\n",
    "\n",
    "Using pandas to import csv data."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "raw_birds = pd.read_csv(\n",
    "    \"https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-04-30/raw/Chicago_collision_data.csv\"\n",
    ")\n",
    "raw_call = pd.read_csv(\n",
    "    \"https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-04-30/raw/bird_call.csv\",\n",
    "    sep=\" \",\n",
    ")\n",
    "raw_light = pd.read_csv(\n",
    "    \"https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-04-30/raw/Light_levels_dryad.csv\"\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Original DataFrames\n",
    "\n",
    "Taking a quick look at the three imported (raw) pandas dataframes."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Genus</th>\n",
       "      <th>Species</th>\n",
       "      <th>Date</th>\n",
       "      <th>Locality</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Ammodramus</td>\n",
       "      <td>nelsoni</td>\n",
       "      <td>1982-10-03</td>\n",
       "      <td>MP</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Ammodramus</td>\n",
       "      <td>nelsoni</td>\n",
       "      <td>1984-05-21</td>\n",
       "      <td>CHI</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Ammodramus</td>\n",
       "      <td>nelsoni</td>\n",
       "      <td>1984-05-25</td>\n",
       "      <td>MP</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Ammodramus</td>\n",
       "      <td>nelsoni</td>\n",
       "      <td>1985-10-08</td>\n",
       "      <td>MP</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Ammodramus</td>\n",
       "      <td>nelsoni</td>\n",
       "      <td>1986-09-10</td>\n",
       "      <td>MP</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        Genus  Species        Date Locality\n",
       "0  Ammodramus  nelsoni  1982-10-03       MP\n",
       "1  Ammodramus  nelsoni  1984-05-21      CHI\n",
       "2  Ammodramus  nelsoni  1984-05-25       MP\n",
       "3  Ammodramus  nelsoni  1985-10-08       MP\n",
       "4  Ammodramus  nelsoni  1986-09-10       MP"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "raw_birds.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Species</th>\n",
       "      <th>Family</th>\n",
       "      <th>Collisions</th>\n",
       "      <th>Flight</th>\n",
       "      <th>Call</th>\n",
       "      <th>Habitat</th>\n",
       "      <th>Stratum</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Zonotrichia</td>\n",
       "      <td>albicollis</td>\n",
       "      <td>Passerellidae</td>\n",
       "      <td>10133</td>\n",
       "      <td>Yes</td>\n",
       "      <td>Forest</td>\n",
       "      <td>Lower</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Junco</td>\n",
       "      <td>hyemalis</td>\n",
       "      <td>Passerellidae</td>\n",
       "      <td>6303</td>\n",
       "      <td>Yes</td>\n",
       "      <td>Edge</td>\n",
       "      <td>Lower</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Melospiza</td>\n",
       "      <td>melodia</td>\n",
       "      <td>Passerellidae</td>\n",
       "      <td>5124</td>\n",
       "      <td>Yes</td>\n",
       "      <td>Edge</td>\n",
       "      <td>Lower</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Melospiza</td>\n",
       "      <td>georgiana</td>\n",
       "      <td>Passerellidae</td>\n",
       "      <td>4910</td>\n",
       "      <td>Yes</td>\n",
       "      <td>Open</td>\n",
       "      <td>Lower</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Seiurus</td>\n",
       "      <td>aurocapilla</td>\n",
       "      <td>Parulidae</td>\n",
       "      <td>4580</td>\n",
       "      <td>Yes</td>\n",
       "      <td>Forest</td>\n",
       "      <td>Lower</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       Species       Family     Collisions  Flight Call Habitat Stratum\n",
       "0  Zonotrichia   albicollis  Passerellidae   10133  Yes  Forest   Lower\n",
       "1        Junco     hyemalis  Passerellidae    6303  Yes    Edge   Lower\n",
       "2    Melospiza      melodia  Passerellidae    5124  Yes    Edge   Lower\n",
       "3    Melospiza    georgiana  Passerellidae    4910  Yes    Open   Lower\n",
       "4      Seiurus  aurocapilla      Parulidae    4580  Yes  Forest   Lower"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "raw_call.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Date</th>\n",
       "      <th>Light_Score</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2000-03-06</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2000-03-08</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2000-03-10</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2000-03-31</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2000-04-02</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         Date  Light_Score\n",
       "0  2000-03-06            3\n",
       "1  2000-03-08           15\n",
       "2  2000-03-10            3\n",
       "3  2000-03-31            3\n",
       "4  2000-04-02           17"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "raw_light.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Cleaning Data Using Pyjanitor"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Pyjanitor provides additional method calls to standard pandas dataframe objects. The *clean_names()* method is one example which removes whitespace and lowercases all column names."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "clean_light = raw_light.clean_names()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>light_score</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2000-03-06</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2000-03-08</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2000-03-10</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2000-03-31</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2000-04-02</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         date  light_score\n",
       "0  2000-03-06            3\n",
       "1  2000-03-08           15\n",
       "2  2000-03-10            3\n",
       "3  2000-03-31            3\n",
       "4  2000-04-02           17"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "clean_light.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Pyjanitor champions the cleaning process using the **call chaining approach**. We use this here to provide multiple column renaming. As our dataframes have inconsistent column names we rename the columns in the raw_call dataframe. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "clean_call = (\n",
    "    raw_call.rename_column(\n",
    "        \"Species\", \"Genus\"\n",
    "    ).rename_column(  # rename 'Species' column to 'Genus'\n",
    "        \"Family\", \"Species\"\n",
    "    )  # rename 'Family' columnto 'Species'\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Genus</th>\n",
       "      <th>Species</th>\n",
       "      <th>Collisions</th>\n",
       "      <th>Flight</th>\n",
       "      <th>Call</th>\n",
       "      <th>Habitat</th>\n",
       "      <th>Stratum</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Zonotrichia</td>\n",
       "      <td>albicollis</td>\n",
       "      <td>Passerellidae</td>\n",
       "      <td>10133</td>\n",
       "      <td>Yes</td>\n",
       "      <td>Forest</td>\n",
       "      <td>Lower</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Junco</td>\n",
       "      <td>hyemalis</td>\n",
       "      <td>Passerellidae</td>\n",
       "      <td>6303</td>\n",
       "      <td>Yes</td>\n",
       "      <td>Edge</td>\n",
       "      <td>Lower</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Melospiza</td>\n",
       "      <td>melodia</td>\n",
       "      <td>Passerellidae</td>\n",
       "      <td>5124</td>\n",
       "      <td>Yes</td>\n",
       "      <td>Edge</td>\n",
       "      <td>Lower</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Melospiza</td>\n",
       "      <td>georgiana</td>\n",
       "      <td>Passerellidae</td>\n",
       "      <td>4910</td>\n",
       "      <td>Yes</td>\n",
       "      <td>Open</td>\n",
       "      <td>Lower</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Seiurus</td>\n",
       "      <td>aurocapilla</td>\n",
       "      <td>Parulidae</td>\n",
       "      <td>4580</td>\n",
       "      <td>Yes</td>\n",
       "      <td>Forest</td>\n",
       "      <td>Lower</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         Genus      Species     Collisions  Flight Call Habitat Stratum\n",
       "0  Zonotrichia   albicollis  Passerellidae   10133  Yes  Forest   Lower\n",
       "1        Junco     hyemalis  Passerellidae    6303  Yes    Edge   Lower\n",
       "2    Melospiza      melodia  Passerellidae    5124  Yes    Edge   Lower\n",
       "3    Melospiza    georgiana  Passerellidae    4910  Yes    Open   Lower\n",
       "4      Seiurus  aurocapilla      Parulidae    4580  Yes  Forest   Lower"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "clean_call.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can chain as many standard pandas commands as we like, along with any pyjanitor specific methods."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "clean_birds = (\n",
    "    raw_birds\n",
    "    # merge the raw_birds dataframe with clean_raw dataframe\n",
    "    .merge(clean_call, how=\"left\")\n",
    "    .select_columns(\n",
    "        [\n",
    "            \"Genus\",\n",
    "            \"Species\",\n",
    "            \"Date\",\n",
    "            \"Locality\",\n",
    "            \"Collisions\",\n",
    "            \"Call\",\n",
    "            \"Habitat\",\n",
    "            \"Stratum\",\n",
    "        ]\n",
    "    )  # include list of cols\n",
    "    .clean_names()\n",
    "    # rename 'collisions' column to 'family' in merged dataframe\n",
    "    .rename_column(\"collisions\", \"family\")\n",
    "    .rename_column(\"call\", \"flight_call\")\n",
    "    # drop all rows which contain a NaN\n",
    "    .dropna()\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>genus</th>\n",
       "      <th>species</th>\n",
       "      <th>date</th>\n",
       "      <th>locality</th>\n",
       "      <th>family</th>\n",
       "      <th>flight_call</th>\n",
       "      <th>habitat</th>\n",
       "      <th>stratum</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>89</th>\n",
       "      <td>Passerculus</td>\n",
       "      <td>sandwichensis</td>\n",
       "      <td>1978-10-27</td>\n",
       "      <td>MP</td>\n",
       "      <td>Passerellidae</td>\n",
       "      <td>Yes</td>\n",
       "      <td>Open</td>\n",
       "      <td>Lower\\t</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>90</th>\n",
       "      <td>Passerculus</td>\n",
       "      <td>sandwichensis</td>\n",
       "      <td>1979-10-23</td>\n",
       "      <td>MP</td>\n",
       "      <td>Passerellidae</td>\n",
       "      <td>Yes</td>\n",
       "      <td>Open</td>\n",
       "      <td>Lower\\t</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>91</th>\n",
       "      <td>Passerculus</td>\n",
       "      <td>sandwichensis</td>\n",
       "      <td>1980-04-19</td>\n",
       "      <td>MP</td>\n",
       "      <td>Passerellidae</td>\n",
       "      <td>Yes</td>\n",
       "      <td>Open</td>\n",
       "      <td>Lower\\t</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>92</th>\n",
       "      <td>Passerculus</td>\n",
       "      <td>sandwichensis</td>\n",
       "      <td>1981-09-23</td>\n",
       "      <td>MP</td>\n",
       "      <td>Passerellidae</td>\n",
       "      <td>Yes</td>\n",
       "      <td>Open</td>\n",
       "      <td>Lower\\t</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>93</th>\n",
       "      <td>Passerculus</td>\n",
       "      <td>sandwichensis</td>\n",
       "      <td>1982-05-20</td>\n",
       "      <td>MP</td>\n",
       "      <td>Passerellidae</td>\n",
       "      <td>Yes</td>\n",
       "      <td>Open</td>\n",
       "      <td>Lower\\t</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          genus        species        date locality         family  \\\n",
       "89  Passerculus  sandwichensis  1978-10-27       MP  Passerellidae   \n",
       "90  Passerculus  sandwichensis  1979-10-23       MP  Passerellidae   \n",
       "91  Passerculus  sandwichensis  1980-04-19       MP  Passerellidae   \n",
       "92  Passerculus  sandwichensis  1981-09-23       MP  Passerellidae   \n",
       "93  Passerculus  sandwichensis  1982-05-20       MP  Passerellidae   \n",
       "\n",
       "   flight_call habitat  stratum  \n",
       "89         Yes    Open  Lower\\t  \n",
       "90         Yes    Open  Lower\\t  \n",
       "91         Yes    Open  Lower\\t  \n",
       "92         Yes    Open  Lower\\t  \n",
       "93         Yes    Open  Lower\\t  "
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "clean_birds.head()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.16"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
